Telegram Group & Telegram Channel
Какие магические методы в Python вы знаете?

Магическими методами в Python называют встроенные методы с двойными подчёркиваниями (например, `__init__`, `__str__`). Они позволяют определять поведение классов для различных операций.

Вот несколько магических методов для примера:
▫️`__init__` — для инициализации нового объекта;
▫️`__del__` — деструктор, который вызывается при удалении объекта;
▫️`__str__` — определяет поведение функции `str()`, вызванной для экземпляра вашего класса;
▫️`__len__` — возвращает длину объекта;
▫️`__eq__` — определяет поведение оператора равенства `==`;
▫️`__iter__` — возвращает итератор для объекта;
▫️`__getitem__` — получение значения по ключу или индексу;
▫️`__call__` — позволяет объекту класса вести себя как функция.

#программирование
#python



tg-me.com/ds_interview_lib/336
Create:
Last Update:

Какие магические методы в Python вы знаете?

Магическими методами в Python называют встроенные методы с двойными подчёркиваниями (например, `__init__`, `__str__`). Они позволяют определять поведение классов для различных операций.

Вот несколько магических методов для примера:
▫️`__init__` — для инициализации нового объекта;
▫️`__del__` — деструктор, который вызывается при удалении объекта;
▫️`__str__` — определяет поведение функции `str()`, вызванной для экземпляра вашего класса;
▫️`__len__` — возвращает длину объекта;
▫️`__eq__` — определяет поведение оператора равенства `==`;
▫️`__iter__` — возвращает итератор для объекта;
▫️`__getitem__` — получение значения по ключу или индексу;
▫️`__call__` — позволяет объекту класса вести себя как функция.

#программирование
#python

BY Библиотека собеса по Data Science | вопросы с собеседований


Warning: Undefined variable $i in /var/www/tg-me/post.php on line 283

Share with your friend now:
tg-me.com/ds_interview_lib/336

View MORE
Open in Telegram


Библиотека собеса по Data Science | вопросы с собеседований Telegram | DID YOU KNOW?

Date: |

Look for Channels Online

You guessed it – the internet is your friend. A good place to start looking for Telegram channels is Reddit. This is one of the biggest sites on the internet, with millions of communities, including those from Telegram.Then, you can search one of the many dedicated websites for Telegram channel searching. One of them is telegram-group.com. This website has many categories and a really simple user interface. Another great site is telegram channels.me. It has even more channels than the previous one, and an even better user experience.These are just some of the many available websites. You can look them up online if you’re not satisfied with these two. All of these sites list only public channels. If you want to join a private channel, you’ll have to ask one of its members to invite you.

China’s stock markets are some of the largest in the world, with total market capitalization reaching RMB 79 trillion (US$12.2 trillion) in 2020. China’s stock markets are seen as a crucial tool for driving economic growth, in particular for financing the country’s rapidly growing high-tech sectors.Although traditionally closed off to overseas investors, China’s financial markets have gradually been loosening restrictions over the past couple of decades. At the same time, reforms have sought to make it easier for Chinese companies to list on onshore stock exchanges, and new programs have been launched in attempts to lure some of China’s most coveted overseas-listed companies back to the country.

Библиотека собеса по Data Science | вопросы с собеседований from pl


Telegram Библиотека собеса по Data Science | вопросы с собеседований
FROM USA